all: 
	make funsl
	make test

funsl: 
	./compiler.lisp

test: funsl-unittest funsl-c-unittest 
	mono funsl-unittest.exe
	./funsl-c-unittest
	rm *.log

helloworld-libsl: helloworld-libsl.cs
	gmcs -r:OpenMetaverse.dll helloworld-libsl.cs -out:helloworld-libsl.exe

helloworld-funsl: helloworld-funsl.cs
	gmcs  helloworld-funsl.cs funsl.cs funsl-api.cs -out:helloworld.exe

helloworld-c-funsl: funsl.c funsl.h funsl-api.c funsl-api.h helloworld-funsl.c md5.c
	gcc -std=c99 `curl-config --cflags` `curl-config --libs` -Wall -lm md5.c funsl.c funsl-api.c helloworld-funsl.c -o helloworld

funsl-unittest:  funsl-unittest.cs funsl.cs
	gmcs -r:OpenMetaverse.dll -r:OpenMetaverseTypes.dll funsl-unittest.cs funsl.cs -out:funsl-unittest.exe

funsl-c-unittest: funsl.c funsl-unittest.c
	gcc -std=c99 -Wall -lm funsl.c funsl-unittest.c -o funsl-c-unittest
